package com.hqq.behaviour.delegation;

import com.hqq.behaviour.delegation.printers.CanonPrinter;
import com.hqq.behaviour.delegation.printers.EpsonPrinter;
import com.hqq.behaviour.delegation.printers.HpPrinter;

/**
 * App
 * 测试类
 * Created by heqianqian on 2017/6/14.
 */
public class App {

    private static String MESSAGE = "Delegation Patterns";

    public static void main(String[] args) {
        HpPrinter hpPrinter = new HpPrinter();
        CanonPrinter canonPrinter = new CanonPrinter();
        EpsonPrinter epsonPrinter = new EpsonPrinter();

        PrinterController hpController = new PrinterController(hpPrinter);
        PrinterController canonController = new PrinterController(canonPrinter);
        PrinterController epsonController = new PrinterController(epsonPrinter);

        hpController.print(MESSAGE);
        canonController.print(MESSAGE);
        epsonController.print(MESSAGE);
    }
}
